<template>
	<view>
		<u-navbar leftIconColor="#FFFFFF" fixed placeholder @leftClick="leftClick" bgColor="#108EE9">
			<view slot="center" style="color: #ffffff;">{{pageTitle}}</view>
		</u-navbar>
		<view class="content">
			<u-parse :content="content"></u-parse>
		</view>
	</view>
</template>

<script>
	import { getAppagreement } from '@/api/api'
	export default {
		data() {
			return {
				content: '',
				pageTitle: '关于我们'
			}
		},
		onLoad(e) {
			let type = e.type ? e.type : 1;
			switch (type) {
				case '2':
					this.pageTitle = '用户协议';
					getAppagreement({type:'agreement'}).then((res) => {
						this.content = res;
					});
					break;
				case '3':
					this.pageTitle = '隐私政策';
					getAppagreement({type:'privacy'}).then((res) => {
						this.content = res;
					});
					break;
			}
		},
		methods: {
			//返回
			leftClick() {
				uni.navigateBack();
			},
		}
	}
</script>

<style>
	page {
		background-color: #FFFFFF;
	}

	.content {
		padding: 30rpx;
	}

	.feedback-input {
		background: #EEEEEE;
	}

	.login_btn {
		display: inline-block;
		text-decoration: none;
		width: 100%;
		height: 72rpx;
		margin-top: 72rpx;
		background: -webkit-linear-gradient(228deg, #0693e6 0%, #017fcc 100%);
		background: -o-linear-gradient(228deg, #0693e6 0%, #017fcc 100%);
		background: linear-gradient(222deg, #0693e6 0%, #017fcc 100%);
		-webkit-box-shadow: 0px 10rpx 20rpx 0px rgba(16, 142, 233, 0.4);
		box-shadow: 0px 10rpx 20rpx 0px rgba(16, 142, 233, 0.4);
		border-radius: 36rpx;
		color: #ffffff;
		font-size: 32rpx;
		font-weight: bold;
		line-height: 72rpx;
		text-align: center;
	}
</style>
